package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.CommonReviewInfoMapper;
import com.ruoyi.business.domain.CommonReviewInfo;
import com.ruoyi.business.service.ICommonReviewInfoService;

/**
 * 通用审核记录Service业务层处理
 * 
 * @author asher
 * @date 2021-11-17
 */
@Service
public class CommonReviewInfoServiceImpl implements ICommonReviewInfoService 
{
    @Autowired
    private CommonReviewInfoMapper commonReviewInfoMapper;

    /**
     * 查询通用审核记录
     * 
     * @param recordId 通用审核记录主键
     * @return 通用审核记录
     */
    @Override
    public CommonReviewInfo selectCommonReviewInfoByRecordId(Long recordId)
    {
        return commonReviewInfoMapper.selectCommonReviewInfoByRecordId(recordId);
    }

    /**
     * 查询通用审核记录列表
     * 
     * @param commonReviewInfo 通用审核记录
     * @return 通用审核记录
     */
    @Override
    public List<CommonReviewInfo> selectCommonReviewInfoList(CommonReviewInfo commonReviewInfo)
    {
        return commonReviewInfoMapper.selectCommonReviewInfoList(commonReviewInfo);
    }

    /**
     * 新增通用审核记录
     * 
     * @param commonReviewInfo 通用审核记录
     * @return 结果
     */
    @Override
    public int insertCommonReviewInfo(CommonReviewInfo commonReviewInfo)
    {
        commonReviewInfo.setCreateTime(DateUtils.getNowDate());
        return commonReviewInfoMapper.insertCommonReviewInfo(commonReviewInfo);
    }

    /**
     * 修改通用审核记录
     * 
     * @param commonReviewInfo 通用审核记录
     * @return 结果
     */
    @Override
    public int updateCommonReviewInfo(CommonReviewInfo commonReviewInfo)
    {
        commonReviewInfo.setUpdateTime(DateUtils.getNowDate());
        return commonReviewInfoMapper.updateCommonReviewInfo(commonReviewInfo);
    }

    /**
     * 批量删除通用审核记录
     * 
     * @param recordIds 需要删除的通用审核记录主键
     * @return 结果
     */
    @Override
    public int deleteCommonReviewInfoByRecordIds(Long[] recordIds)
    {
        return commonReviewInfoMapper.deleteCommonReviewInfoByRecordIds(recordIds);
    }

    /**
     * 删除通用审核记录信息
     * 
     * @param recordId 通用审核记录主键
     * @return 结果
     */
    @Override
    public int deleteCommonReviewInfoByRecordId(Long recordId)
    {
        return commonReviewInfoMapper.deleteCommonReviewInfoByRecordId(recordId);
    }
}
